Release 10.1A: OpenEdge Data Management:
SQL Reference
Date-time formats
The
TO_CHARfunction supports the date-format and the time-format strings to control the output of date and time values. The format strings consist of keywords that SQL interprets and replaces with formatted values.The syntax for the
TO_CHARfunction is as follows:Syntax
expressionConverts to character form. It must evaluate to a value of the date or time data type to use the format_string.
format_stringSpecifies the format of the output. SQL ignores the format string if the
expressionargument does not evaluate to a date or time.Supply the format strings, enclosed in single quotation marks, as the second argument to the function. The format strings are case sensitive. For instance, SQL replaces
DAYwith all uppercase letters, but follows the case ofDay.The following example illustrates the difference between how a date value displays with and without the
ExampleTO_CHARfunction:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |